<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{% block title %} | sobremesa{% endblock %}</title>
    <link rel="shortcut icon" href="/static/favicon.png"/>
    <link rel="stylesheet" href="/static/plugins/layui/css/layui.css">
    <link rel="stylesheet" href="/static/css/main.min.css">
    {% block header %}

    {% endblock %}
</head>
<body>
<header id="header">
    <div class="inner">
        <ul class="layui-nav">
            <!--      nav      -->
            <li class="layui-nav-item">
                <a href="{% url 'front:index' %}">发现</a>
            </li>
            <li class="layui-nav-item">
                <a href="{% url 'front:topics' %}">话题</a>
            </li>
            <li class="layui-nav-item">
                <a href="{% url 'front:search' %}">搜索</a>
            </li>
            {% if request.user.id %}
                <li class="layui-nav-item layui-layout-right">
                    <a href=""><img src="{{ request.user.avatar }}" class="layui-nav-img">{{ request.user.username }}
                    </a>
                    <dl class="layui-nav-child">
                        <dd><a href="{% url 'front:publish' %}">新发布</a></dd>
                        <dd><a href="{% url 'cms:index' %}">我的后台</a></dd>
                        <dd><a href="{% url 'front:logout' %}">退了</a></dd>
                    </dl>
                </li>
            {% else %}
                <li class="layui-nav-item layui-layout-right">
                    <a href="{% url 'front:login' %}">登录注册</a>
                </li>
            {% endif %}
        </ul>
    </div>
</header>
<div id="main">
    <div class="inner">
        {% block main %}

        {% endblock %}
    </div>
</div>
<footer id="footer">
    <div class="inner">
        <p>&copy; 2020 Hi, DarkNight. xxxxxxxxx</p>
    </div>
</footer>
<div class="back-to-top"></div>
</body>
{% block utils %}

{% endblock %}
<script src="/static/plugins/layui/layui.all.js"></script>
<script src="/static/plugins/art-template/template-web.js"></script>
<script src="/static/js/main.min.js"></script>
{% block footer %}

{% endblock %}
<script>
    $(function () {
        fixedFooter()
    })
</script>
</html>